import { defineStore } from 'pinia'
let cahceList:string[] = []
interface dataType {
  [key:string]:object
}
export const routerStore = defineStore('routeStore', {
    state:()=>(
        {
          cahceList : cahceList,
          pageParam : {} as dataType,
        }
    ),
    actions:{
      addCacheList(name:string):void{
        this.cahceList.push(name)
      },
      deleteCacheList():void{
        this.cahceList.pop()
      },
      resetCacheList():void{
        this.cahceList = cahceList
      },
      clearCacheList():void{
        this.cahceList = []
      }
    }
}  
)
